package com.neusoft.resturant.controller;


import com.neusoft.resturant.common.utils.R;
import com.neusoft.resturant.entity.ResBanner;
import com.neusoft.resturant.service.IResBannerService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;

/**
 * 轮播图Controller
 * 
 * @author lzx
 * @date 2023-09-27
 */
@RestController
@RequestMapping("/restaurant/banner")
public class ResBannerController
{
    @Autowired
    private IResBannerService resBannerService;

    /**
     * 获取轮播图详细信息
     */
    @GetMapping(value = "/{id}")
    public R getInfo(@PathVariable("id") Long id)
    {
        return R.success(resBannerService.selectResBannerById(id));
    }

    @GetMapping("/list")
    public R getlist(ResBanner resBanner){
        return R.success(resBannerService.selectResBannerList(resBanner));
    }
}
